﻿using System;
using System.Windows;
using System.Windows.Controls;

namespace MJD
{
    public partial class ConfirmationWindow : ChildWindow
    {
        public event EventHandler ButtonClicked;


        public ConfirmationWindow(string message)
        {
            InitializeComponent();
            NotificationTextBox.Text = message;
        }


        public ConfirmationWindow(string message, string details)
        {
            InitializeComponent();
            NotificationTextBox.Text = message + Environment.NewLine + Environment.NewLine + details;
        }


        private void OKButton_Click(object sender, RoutedEventArgs e)
        {
            DialogResult = true;

            if (ButtonClicked != null)
                ButtonClicked(this, new EventArgs());
        }


        private void CancelButton_Click(object sender, RoutedEventArgs e)
        {
            DialogResult = false;

            if (ButtonClicked != null)
                ButtonClicked(this, new EventArgs());
        }
    }
}

